home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
AIncludes
/
DesktopAnimation.a
< prev
next >
Wrap
Text File
|
1996-05-01
|
9KB
|
272 lines
;
; File: DesktopAnimation.a
;
; Contains: Desktop Animation Interfaces.
;
; Version: Technology: System 8
; Release: Universal Interfaces 3.0d3 on Copland DR1
;
; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
;
; Bugs?: If you find a problem with this file, send the file and version
; information (from above) and the problem description to:
;
; Internet: apple.bugs@applelink.apple.com
; AppleLink: APPLE.BUGS
;
;
IF &TYPE('__DESKTOPANIMATION__') = 'UNDEFINED' THEN
__DESKTOPANIMATION__ SET 1
IF &TYPE('__APPEARANCE__') = 'UNDEFINED' THEN
include 'Appearance.a'
ENDIF
IF &TYPE('__CODEFRAGMENTS__') = 'UNDEFINED' THEN
include 'CodeFragments.a'
ENDIF
IF &TYPE('__COLLECTIONS__') = 'UNDEFINED' THEN
include 'Collections.a'
ENDIF
IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
include 'Dialogs.a'
ENDIF
IF &TYPE('__DISPLAYS__') = 'UNDEFINED' THEN
include 'Displays.a'
ENDIF
IF &TYPE('__FILEMANAGERTYPES__') = 'UNDEFINED' THEN
include 'FileManagerTypes.a'
ENDIF
IF &TYPE('__GXTYPES__') = 'UNDEFINED' THEN
include 'GXTypes.a'
ENDIF
IF &TYPE('__QDOFFSCREEN__') = 'UNDEFINED' THEN
include 'QDOffscreen.a'
ENDIF
IF &TYPE('__TEXTOBJECTS__') = 'UNDEFINED' THEN
include 'TextObjects.a'
ENDIF
IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
include 'Types.a'
ENDIF
IF FOR_SYSTEM8_COOPERATIVE THEN
; Gestalt selectors to tell if DAM is installed #### Move to Gestalt.i later
gestaltDesktopAnimationMgr EQU 'danm'
gestaltDesktopAnimationMgrPresent EQU 0 ; If bit set then DAM is present
; Desktop Animation module file resources
kDesktopAnimModuleFileType EQU 'damm'
kDesktopAnimListRsrcType EQU 'giz#'
kDesktopAnimListRsrcVers EQU 0
kDesktopAnimListRsrcID EQU 128
kDesktopAnimFirstRsrcID EQU 8192
kDesktopAnimLastRsrcID EQU 16383
; Properties relating to the DesktopAnimPanel
kDesktopAnimPanelPropertyTag EQU 'ptag'
kDesktopAnimPanelUndoTextTag EQU 'utxt'
kDesktopAnimPanelValueToggleTag EQU 'vtog'
; Desktop Animation info values
kDesktopAnimModuleInfoVers EQU 0
kDesktopAnimModuleInfoShareAny EQU 0
; DesktopAnimFlags
kDesktopAnimDesktop EQU $00000001
kDesktopAnimBackground EQU $00000002 ; No drawing behind this module
kDesktopAnimScreenSaver EQU $00000004
kDesktopAnimCanShareWindow EQU $00000008
kDesktopAnimAllDisplays EQU $00000010
kDesktopAnimIsSharingWindow EQU $00000020 ; If called as part of multiple modules
kDesktopAnimUnfadeOnKeyboard EQU $00000040 ; ScreenSaver only
kDesktopAnimUnfadeOnMouseMotion EQU $00000080 ; ScreenSaver only
kDesktopAnimOwnsColorPalette EQU $00000100 ; ScreenSaver only
kDesktopAnimRequestTerminate EQU $00000200 ; ScreenSaver output only
kDesktopAnimDrawingOffscreen EQU $00000400 ; Should be set when asking a module to draw to an offscreen
; Flags that indicate what mode we are running in
kDesktopAnimModeFlags EQU $00000007 ; Flags we determine at runtime when initializing/running a module
kDesktopAnimRuntimeFlags EQU $00000737
; typedef UInt32 DesktopAnimFlags
; Pre-defined Desktop Animation property tags
kDesktopAnimDisplayRgnTag EQU 'drgn'
kDesktopAnimDisplayDepthTag EQU 'dpth'
; Error codes (will be moved to Error.i when we have an assigned range)
kDesktopAnimModuleNotFoundErr EQU -3000
kDesktopAnimServerNotFoundErr EQU -3001
kDesktopAnimDrawNotFoundErr EQU -3002
kDesktopAnimPanelNotFoundErr EQU -3003
kDesktopAnimDrawInitErr EQU -3004
kDesktopAnimDrawPanelErr EQU -3005
kDesktopAnimBadScreenSaverErr EQU -3006
kDesktopAnimScreenSaverInternalErr EQU -3007
kDesktopAnimItemNotModuleErr EQU -3008
kDesktopAnimNoQuickdrawGXErr EQU -3009
kDesktopAnimBadDesktopAnimModuleDescRefErr EQU -3010
kDesktopAnimUnknownModuleListVersErr EQU -3011
kDesktopAnimUnknownModuleInfoVersErr EQU -3012
kDesktopAnimUnknownPatternListVersErr EQU -3013
kDesktopAnimIllegalDesktopAnimationStatusErr EQU -3014
kDesktopAnimModuleNameTooLongErr EQU -3015
kDesktopAnimOffscreenLockPixelsErr EQU -3016
kDesktopAnimQuickdrawGXErr EQU -3017
; Desktop Pattern Support
kDesktopPatternListRsrcType EQU 'dtp#'
kDesktopPatternListRsrcVers EQU 0
kDesktopPatternListRsrcID EQU 128
; Reasons Screen Saver wants to unfade
kScreenSaverUnfadeUnknown EQU 0
kScreenSaverUnfadeKeyboard EQU 1
kScreenSaverUnfadeMouseMotion EQU 2
kScreenSaverUnfadeByRequest EQU 3
kScreenSaverUnfadeSelfRequest EQU 4
; typedef SInt32 ScreenSaverUnfadeType
; The drawing surfaces record
DesktopAnimGraphicsPorts RECORD 0
drawPort ds.l 1 ; offset: $0 (0)
gxDrawPort ds.l 1 ; offset: $4 (4)
sizeof EQU * ; size: $8 (8)
ENDR
; Offscreen drawing record
DesktopAnimOffscreenGraphicsPorts RECORD 0
offGWorld ds.l 1 ; offset: $0 (0)
offGXDrawPort ds.l 1 ; offset: $4 (4)
offGXViewDevice ds.l 1 ; offset: $8 (8)
offGXViewGroup ds.l 1 ; offset: $C (12)
sizeof EQU * ; size: $10 (16)
ENDR
; Info record for modules when created/opened
DesktopAnimModuleInfo RECORD 0
version ds.l 1 ; offset: $0 (0)
moduleFlags ds.l 1 ; offset: $4 (4)
shareWithSignature ds.l 1 ; offset: $8 (8)
sizeof EQU * ; size: $C (12)
ENDR
; Info record for Desktop Animation list resource (kDesktopAnimListRsrcType)
DesktopAnimModuleListInfo RECORD 0
itemListID ds.w 1 ; offset: $0 (0)
textObjectListID ds.w 1 ; offset: $2 (2)
byLineIndex ds.w 1 ; offset: $4 (4)
moduleNameIndex ds.w 1 ; offset: $6 (6)
moduleInfo ds DesktopAnimModuleInfo ; offset: $8 (8)
desktopAnimPanelHandler ds Str63 ; offset: $14 (20)
desktopAnimDrawHandler ds Str63 ; offset: $54 (84)
sizeof EQU * ; size: $94 (148)
ENDR
; The Desktop Animation list resource (kDesktopAnimListRsrcType)
DesktopAnimModuleListRsrcRec RECORD 0
version ds.l 1 ; offset: $0 (0)
desktopAnimServerHandler ds Str63 ; offset: $4 (4)
modulesCnt ds.l 1 ; offset: $44 (68)
modules ds DesktopAnimModuleListInfo ; offset: $48 (72) <-- really an array of length one
sizeof EQU * ; size: $DC (220)
ENDR
; typedef struct DesktopAnimModuleListRsrcRec * DesktopAnimModuleListRsrcPtr
; typedef DesktopAnimModuleListRsrcPtr * DesktopAnimModuleListRsrcHandle
; Desktop Pattern Record
DesktopPattern RECORD 0
ppatRsrcID ds.w 1 ; offset: $0 (0)
nameListID ds.w 1 ; offset: $2 (2)
nameListIndex ds.w 1 ; offset: $4 (4)
sizeof EQU * ; size: $6 (6)
ENDR
; Desktop Pattern List resource (kDesktopPatternListRsrcType)
DesktopPatternListRsrcRec RECORD 0
version ds.w 1 ; offset: $0 (0)
pattCnt ds.w 1 ; offset: $2 (2)
patterns ds DesktopPattern ; offset: $4 (4) <-- really an array of length one
sizeof EQU * ; size: $A (10)
ENDR
; typedef struct DesktopPatternListRsrcRec * DesktopPatternListRsrcPtr
; typedef DesktopPatternListRsrcPtr * DesktopPatternListRsrcHandle
ENDIF
IF FOR_SYSTEM8_PREEMPTIVE THEN
; Desktop Animation Module type
kItemIsBackground EQU $0001
kItemIsModule EQU $0002
kItemIsPattern EQU $0003
kItemIsNoModule EQU $0004 ; Used internally
; typedef SInt16 DesktopAnimItemType
; Desktop Animation status
kDesktopAnimationTurnedOn EQU $00000001 ; Desktop animation is on
kScreenSaverTurnedOn EQU $00000002 ; Screen saving is turned on
kScreenSaverAsleep EQU $00000004 ; Currently in screen saving mode
kScreenSaverDemoMode EQU $00000008 ; Screen saving demo mode (read only)
; typedef UInt32 DesktopAnimationStatusType
; Module description reference
; Desktop Animation Manager API
;
; extern OSStatus GetDesktopAnimationDesktopPatternsFileRef(FSObjectRef *pattFileRef)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION GetDesktopAnimationDesktopPatternsFileRef
ENDIF
;
; extern void GetDesktopAnimationStatus(DesktopAnimationStatusType *status)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION GetDesktopAnimationStatus
ENDIF
;
; extern OSStatus SetDesktopAnimationStatus(DesktopAnimationStatusType status)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION SetDesktopAnimationStatus
ENDIF
;
; extern OSStatus NewDesktopAnimationModuleDescRef(TextObject itemName, FSObjectRef itemFile, SInt32 itemID, DesktopAnimItemType itemType, DesktopAnimModuleDescRef *moduleDescRef)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION NewDesktopAnimationModuleDescRef
ENDIF
;
; extern OSStatus CloneDesktopAnimationModuleDescRef(DesktopAnimModuleDescRef moduleDescRef)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CloneDesktopAnimationModuleDescRef
ENDIF
;
; extern Boolean EquivalentDesktopAnimationModuleDescRefs(DesktopAnimModuleDescRef moduleADescRef, DesktopAnimModuleDescRef moduleBDescRef)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION EquivalentDesktopAnimationModuleDescRefs
ENDIF
;
; extern OSStatus GetDesktopAnimationModuleDescInfo(DesktopAnimModuleDescRef moduleDescRef, TextObject itemName, FSObjectRef *itemFile, SInt32 *itemID, DesktopAnimItemType *itemType)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION GetDesktopAnimationModuleDescInfo
ENDIF
;
; extern OSStatus DisposeDesktopAnimModuleDescRef(DesktopAnimModuleDescRef moduleDescRef)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION DisposeDesktopAnimModuleDescRef
ENDIF
ENDIF
ENDIF ; __DESKTOPANIMATION__